/*
 * $Id: UploadTag.java,v 1.1 2009/05/08 16:34:04 afaichun Exp $
 * 
 * Copyright (C) 2008 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.onwatch.xml.tag;

import java.util.ArrayList;

public class UploadTag {
	private String id = null;
	private String refid = null;
	private boolean useContent = false;
	private ArrayList<String> files = new ArrayList<String>();
	private ArrayList<OnExitTag> onExits = new ArrayList<OnExitTag>();
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getRefId() {
		return refid;
	}
	public void setRefId(String refid) {
		this.refid = refid;
	}
	public boolean isUseContent() {
		return useContent;
	}
	public void setUseContent(boolean useContent) {
		this.useContent = useContent;
	}
	public ArrayList<OnExitTag> getOnExits() {
		return onExits;
	}
	public void addOnExit(OnExitTag onExit) {
		onExits.add(onExit);
	}
	public ArrayList<String> getFiles() {
		return files;
	}
	public void addFile(String file) {
		files.add(file);
	}
	public String toString() {
		StringBuffer msg = new StringBuffer();
		msg.append(ExecTag.class.getName()).append(":\n");
		msg.append("{Id: ").append(getId()).append("},");
		msg.append("{refid: ").append(getRefId()).append("},");
		for(String file: files) {
			msg.append("{file: ").append(file).append("},");
		}
		if(isUseContent()) {
			msg.append("{useContent: true").append("}");
		} else {
			msg.append("{useContent: false").append("}");
		}
		for(OnExitTag onExitTag: onExits) {
			msg.append(onExitTag.toString());
		}
		msg.append("\n");
		return msg.toString();
	}
}
